﻿package bacIns 
{
	import bacIns.exchangeddata.BacTableLiveBetPoolInfo;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.text.TextField;
	import game.exchangeddata.HashTable;
	/**
	 * ...
	 * @author Nguyen Thi Bich Phuong (Daisy)
	 */
	public class BacTableLiveBetPoolPanel extends MovieClip {		
		public var txtBankerTf:TextField;
		public var txtPlayerTf:TextField;
		public var txtTieTf:TextField;
		public var txtBankerPairTf:TextField;
		public var txtPlayerPairTf:TextField;
		public var txtBigTf:TextField;
		public var txtSmallTf:TextField;
		
		public var statisticBankerTf:TextField;
		public var statisticPlayerTf:TextField;
		public var statisticTieTf:TextField;
		public var statisticBankerPairTf:TextField;
		public var statisticPlayerPairTf:TextField;
		public var statisticBigTf:TextField;
		public var statisticSmallTf:TextField;
		
		public function BacTableLiveBetPoolPanel() { }
		
		/**
		 * @author Daisy
		 * @param	liveBetPoolGame
		 * @usage This function to display LiveBetPoolGame information to gameview
		 */
		public function updateLiveBetPoolGame(liveBetPoolGame:BacTableLiveBetPoolInfo):void {			
			this.statisticBankerTf.text = liveBetPoolGame.numBanker + "";
			this.statisticPlayerTf.text = liveBetPoolGame.numPlayer + "";
			this.statisticTieTf.text = liveBetPoolGame.numTie + "";
			this.statisticBankerPairTf.text = liveBetPoolGame.numBankerPair + "";
			this.statisticPlayerPairTf.text = liveBetPoolGame.numPlayerPair + "";
			this.statisticBigTf.text = liveBetPoolGame.numBig + "";
			this.statisticSmallTf.text = liveBetPoolGame.numSmall + "";
		}		
		
		/**
		 * @author Daisy
		 * @param	hashTableInfo
		 */
		public function initText(hashTableInfo:HashTable) {
			this.txtBankerTf.text = hashTableInfo.lookupString("Poolbanker") + ":";
			this.txtPlayerTf.text = hashTableInfo.lookupString("Poolplayer") + ":";
			this.txtTieTf.text = hashTableInfo.lookupString("Pooltie") + ":";
			this.txtBankerPairTf.text = hashTableInfo.lookupString("PoolBpair") + ":";
			this.txtPlayerPairTf.text = hashTableInfo.lookupString("PoolPpair") + ":";
			this.txtBigTf.text = hashTableInfo.lookupString("PoolBig") + ":";
			this.txtSmallTf.text = hashTableInfo.lookupString("PoolSmall") + ":";
		}
	}
}